import request from '@/utils/request'

// 查询派工列表
export function listSendorder(query) {
  return request({
    url: '/zyx/sendorder/list',
    method: 'get',
    params: query
  })
}

// 首页查询派工列表
export function listHomeSendorder(query) {
  return request({
    url: '/zyx/sendorder/listHomeSendorder',
    method: 'get',
    params: query
  })
}

// 医院查询我的查询派工列表
export function listMySendorder(query) {
  return request({
    url: '/zyx/sendorder/listMySendorder',
    method: 'get',
    params: query
  })
}

// 医院查询设备所有的派工信息
export function listAllSendorder(query) {
  return request({
    url: '/zyx/sendorder/listAllSendorder',
    method: 'get',
    params: query
  })
}


// 查询派工详细
export function getSendorder(id) {
  return request({
    url: '/zyx/sendorder/' + id,
    method: 'get'
  })
}

// 新增派工
export function addSendorder(data) {
  return request({
    url: '/zyx/sendorder',
    method: 'post',
    data: data
  })
}

// 修改派工
export function updateSendorder(data) {
  return request({
    url: '/zyx/sendorder',
    method: 'put',
    data: data
  })
}

export function onlyupd(data) {
  return request({
    url: '/zyx/sendorder/onlyupd',
    method: 'put',
    data: data
  })
}


// 删除派工
export function delSendorder(id) {
  return request({
    url: '/zyx/sendorder/' + id,
    method: 'delete'
  })
}

// 导出派工
export function exportSendorder(query) {
  return request({
    url: '/zyx/sendorder/export',
    method: 'get',
    params: query
  })
}